class DoubleLinkedList {
 public:
  DoubleLinkedList();
  ~DoubleLinkedList();
  void Show();
  void InsertBegin(int val);
  void InsertEnd(int val);
  void InsertAfter(int idx, int val);
  void DeleteAny(int val);
  void DeleteAll(int val);
  int Find(int val);

 private:
  struct ListNode {
    ListNode(int val) : val_(val), next_(nullptr), prev_(nullptr) {}
    int val_;
    ListNode* next_;
    ListNode* prev_;
  };
  ListNode* dummy_;
};